/**
 * @file  moveReadWriteMemory.h
 * @author your name (you@domain.com)
 * @brief 读写存储器,只有在ST脚本中使用了
 * @version 0.1
 * @date 2025-04-30
 *
 * @copyright Copyright (c) 2025
 *
 */
#ifndef MOVE_ReadWriteMemory_H
#define MOVE_ReadWriteMemory_H
#define AREA_I   0x81
#define AREA_Q   0x82
#define AREA_M   0x83
#define AREA_DB  0x84
#include "xmzTypeDefine.h"
#include <stddef.h>
//PEEK
//PEEK_BOOL
//POKE
//POKE_BOOL
//POKE_BLK
//READ_LITTLE
//WRITE_LITTLE
//READ_BIG
//WRITE_BIG


uint16_t PEEK_Word(uint8_t area, uint16_t dbNumber, uint16_t byteOffset);
uint8_t PEEK_Byte(uint8_t area, uint16_t dbNumber, uint16_t byteOffset);
DWord PEEK_DWord(uint8_t area, uint16_t dbNumber, uint16_t byteOffset);
uint8_t PEEK_BOOL(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint8_t bitOffset);
void POKE_BOOL(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint8_t bitOffset, uint8_t value);
void POKE_Byte(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint8_t value);
void POKE_Word(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint16_t value);
void POKE_BLK(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, const uint8_t* src, size_t length);
void READ_LITTLE(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint8_t* dst, size_t length);
void WRITE_LITTLE(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, const uint8_t* src, size_t length);
void READ_BIG(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, uint8_t* dst, size_t length);
void WRITE_BIG(uint8_t area, uint16_t dbNumber, uint16_t byteOffset, const uint8_t* src, size_t length);

#endif
